from application import db
from common.models.user import User

class EmployList(db.Model):
    __tablename__ = 'employ_list'

    id = db.Column(db.Integer, primary_key=True)
    name = db.Column(db.String(50, 'utf8mb4_0900_ai_ci'))
    mark = db.Column(db.Integer)
    award= db.Column(db.Integer)
    describe = db.Column(db.TEXT)
    company = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    department = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    updated_time = db.Column(db.DateTime)
    created_time = db.Column(db.DateTime)
    city = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    uid = db.Column(db.Integer,db.ForeignKey('user.id'))

    creater = db.relationship('User', foreign_keys=uid)

    # def __repr__(self):
    #     return '%s' % self.nickname